package com.xzzz.irda.guardcat.server.metric.memory;

import com.xzzz.irda.guardcat.server.metric.MetricInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author xzzz
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class JmmInfo extends MetricInfo {

    /**
     * 创建时间
     */
    private String creTime;
    /**
     * 堆内存
     */
    private UsageInfo heapUsage;
    /**
     * 非堆内存
     */
    private UsageInfo nonHeapUsage;
    /**
     * JIT 编译代码缓存区内存
     */
    private UsageInfo codeCacheUsage;
    /**
     * 元空间内存
     */
    private UsageInfo metaspaceUsage;
    /**
     * 类压缩数据区
     */
    private UsageInfo compressedClassSpace;
    /**
     * 新生代
     */
    private UsageInfo edenSpace;
    /**
     * 幸存代
     */
    private UsageInfo survivorSpace;
    /**
     * 老年代
     */
    private UsageInfo oldGen;

    /**
     * 内存使用对象
     */
    @Data
    public static class UsageInfo {
        private Long initValue;
        private Long maxValue;
        private Long committedValue;
        private Long usedValue;
    }
}
